#coding=utf-8
import arcpy
path = r'D:\WorkData\20250712四川河流\0904处理'
arcpy.env.workspace = path
arcpy.env.overwriteOutput = True
spatial_ref = arcpy.SpatialReference(4326)

rivs1 = r'D:\WorkData\20250712四川河流\0904处理\rivs_ok.shp'.decode('utf-8')
cs1 = arcpy.da.UpdateCursor(rivs1, ['SHAPE@','name','county','croType','city'])
i = 1
for row1 in cs1:
    if ',' in row1[2] and ',' not in row1[4]:
        row1[3] = '跨县'
        cs1.updateRow(row1)
